#include <algorithm>
#include <iostream>
#include <vector>

/**
 * PAT A 1068 Find More Coins
 */

bool operator<(const std::vector<int> &lhs, const std::vector<int> &rhs) {
    for (int i = 0; i < lhs.size() && i < rhs.size(); i++) {
        int lval = lhs[i], rval = rhs[i];
        if (lval != rval) return lval < rval;
    }
    return lhs.size() < rhs.size();
}

int main() {
    // Read data
    int nCoins, target;
    scanf("%d %d", &nCoins, &target);
    std::vector<int> values(nCoins);
    for (int i = 0; i < nCoins; i++) scanf("%d", &values[i]);

    // Sort face values
    std::sort(values.begin(), values.end());

    // Use DP to solve the problem
    std::vector<std::vector<int> > buf(target + 1);
    for (int i = 0; i < values.size(); i++) {
        int val = values[i];
        for (int j = target; j >= val; j--) {
            int k = j - val;
            if (!buf[k].empty() || k == 0) {
                std::vector<int> newSeq(buf[k]);
                newSeq.push_back(val);
                if (newSeq < buf[j] || buf[j].empty()) buf[j] = newSeq;
            }
        }
    }

    // Print result
    std::vector<int> &seq = buf[target];
    if (seq.empty()) {
        printf("No Solution\n");
        return 0;
    }
    for (int i = 0; i < seq.size(); i++) {
        int val = seq[i];
        if (i != 0) printf(" ");
        printf("%d", val);
    }
    printf("\n");

    return 0;
}